package classesdemo;


import org.apache.commons.io.IOUtils;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

/**
 * Created by pc on 2015/4/24.
 */
public class ApacheCommDemo {
    public static void main(String args[]) throws IOException {
        //抓取网页
        InputStream is = new URL("http://www.baidu.com").openStream();
        System.out.println(IOUtils.toString(is));
        IOUtils.closeQuietly(is);

    }

}
